package models

import "fmt"

type Router struct {
	Id           int    `gorm:"column:user_id;primaryKey;"`
	RouterName   string `gorm:"column:r_name"`
	RouterUri    string `gorm:"column:r_uri;"`
	RouterMethod string `gorm:"column:r_method"`
	RoleName     string
	Roles        []*Role `gorm:"many2many:router_roles;"`
}

//func(this *Routers) TableName() string{
//	return "roles"
//}
func (this *Router) String() string {
	return fmt.Sprintf("%s-%s", this.RouterName, this.RoleName)
}
